class Bar():
    def __init__(self, name):
        self.name = name

    def __iter__(self):
        yield 1
        yield 2
        yield 3

    def __str__(self):
        return self.name


obj = Bar('ss')
print(str(obj))

